package com.datas.db.hibernatebeans;

import com.datas.utils.hibernatebasebean.BaseHibernateEntity;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Lob;

/**
 * Created by jige0727 on 2017/3/12.
 * 页面资源 功能权限
 */
@Getter
@Setter
@Entity
public class UmsPageResource extends BaseHibernateEntity {
    private String rese_name;
    private String rese_uri;//唯一标示符 页面地址或者按钮地址
    private String rese_type; //元素类型 url页面 btn按钮
    private Integer sort_order; //排序号
    private Integer parent_rese_id; //上级的id 根节点则为 null
    private String parent_rese_name; //上级的名称 !!代码装配
    private String struct = ""; //结构 每个节点的id拼一起 -隔开 !!代码装配

    public UmsPageResource() {
    }

    public UmsPageResource(String rese_name, String rese_uri, String rese_type, Integer sort_order, Integer parent_rese_id) {
        this.rese_name = rese_name;
        this.rese_uri = rese_uri;
        this.rese_type = rese_type;
        this.sort_order = sort_order;
        this.parent_rese_id = parent_rese_id;
    }

    @Column(nullable = false)
    public String getRese_name() {
        return rese_name;
    }

    @Lob
    public String getRese_uri() {
        return rese_uri;
    }

    @Column(nullable = false)
    public String getRese_type() {
        return rese_type;
    }

    @Column(length = 500)
    public String getStruct() {
        return struct;
    }
}
